<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>

<%@ page import="com.scalar.chiptrack.sales.forms.quote.ApproverQuotationForm,com.scalar.chiptrack.utils.ConfigManager"%>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>
<%
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>
<style type="text/css">
a { text-decoration : none}
</style>
<script language="javaScript">
    function closeWindow(form)
    {
        window.close();
    }
    function addTextArea()
    {
        var parent=window.opener;
        var qa=parent.getPrevCommitmentsArray();
        var tab = document.getElementById("prevQuotation");
        for ( var i=0; i<qa.length ; i++ )
        {
            var bgcolor = i%2==0 ? "#DEE1E2":"#FFFFEE";

            var newRow = tab.insertRow ();
            var newCell = newRow.insertCell();
            newCell.bgColor=bgcolor;
            newCell.className='tdThinBorderLB';
            if (qa[i].qNumb != '')
            htmltext = qa[i].qNumb;
            else
            var htmltext = '&nbsp;';
            newCell.innerHTML = htmltext;

            /*newCell = newRow.insertCell();
            newCell.bgColor=bgcolor;
            newCell.className='tdThinBorderLB';
            htmltext = qa[i].qDate;
            newCell.innerHTML = htmltext;*/

            newCell = newRow.insertCell();
            newCell.bgColor=bgcolor;
            newCell.className='tdThinBorderLB';
            if (qa[i].salesorderNo != '')
            htmltext = qa[i].salesorderNo;
            else
            var htmltext = '&nbsp;';
            newCell.innerHTML = htmltext;

            var newCell = newRow.insertCell();
            newCell.bgColor=bgcolor;
            newCell.className='tdThinBorderLB';
            if (qa[i].endCus != '')
            var htmltext = qa[i].endCus;
            else
            var htmltext = '&nbsp;';
            newCell.innerHTML = htmltext;

            newCell = newRow.insertCell();
            newCell.bgColor=bgcolor;
            newCell.className='tdThinBorderLB';
            if (qa[i].newEndCus != '')
            htmltext = qa[i].newEndCus;
            else
            var htmltext = '&nbsp;';
            newCell.innerHTML = htmltext;

            newCell = newRow.insertCell();
            newCell.bgColor=bgcolor;
            newCell.className='tdThinBorderLB';
            if (qa[i].endUser != '')
            htmltext = qa[i].endUser;
            else
            var htmltext = '&nbsp;';
            newCell.innerHTML = htmltext;

            newCell = newRow.insertCell();
            newCell.bgColor=bgcolor;
            newCell.className='tdThinBorderLB';
            if (qa[i].newEndUser != '')
            htmltext = qa[i].newEndUser;
            else
            var htmltext = '&nbsp;';
            newCell.innerHTML = htmltext;

            var newCell = newRow.insertCell();
            newCell.bgColor=bgcolor;
            newCell.className='tdThinBorderLB';
            if (qa[i].pNumber != '')
            htmltext = qa[i].pNumber;
            else
            var htmltext = '&nbsp;';
            newCell.innerHTML = htmltext;

            newCell = newRow.insertCell();
            newCell.bgColor=bgcolor;
            newCell.className='tdThinBorderLB';
            newCell.align="right";
            if (qa[i].shipDate != '')
            htmltext = qa[i].shipDate;
            else
            var htmltext = '&nbsp;';
            newCell.innerHTML = htmltext;

            newCell = newRow.insertCell();
            newCell.bgColor=bgcolor;
            newCell.className='tdThinBorderLB';
            newCell.align="right";
            if (qa[i].qty > 0)
            htmltext = qa[i].qty;
            else
            var htmltext = '&nbsp;';

            newCell.innerHTML = htmltext;


            newCell = newRow.insertCell();
            newCell.bgColor=bgcolor;
            newCell.className='tdThinBorderLBR';
            newCell.align="right";
            if (qa[i].price > 0 )
            htmltext = qa[i].price;
            else
            var htmltext = '&nbsp;';

            newCell.innerHTML = htmltext;

            newCell = newRow.insertCell();
            newCell.bgColor=bgcolor;
            newCell.className='tdThinBorderLB';
            newCell.align="right";
            if (qa[i].scheduleDate!= '')
            htmltext = qa[i].scheduleDate;
            else
            var htmltext = '&nbsp;';
            newCell.innerHTML = htmltext;
          }
    }
</script>
</HEAD>

<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0" onload="addTextArea()">
<form name="quotePopup" method="POST" >
<table width="98%" cellspacing='0' cellpadding='0' border="0" align=center>
    <tr>
        <td colspan="3" align="center" class="NArialL">
                <h4>Previous Commitments</h4>
        </td>
    </tr>
    <tr><td colspan=3><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=3></td></tR>
    <tr><td colspan=3 align="right"> <a href="javascript:closeWindow(quotePopup);" onMouseOver="window.status='Click here to close this window';return true" onmouseout="window.status='';return true" ><font class='NArialL'>Close</font></a></td></tr>
    <tr>
        <td colspan="3" width="100%">
            <table border="0" width="100%">
                <tr>
                    <td height="100%" width="33%">
                        <table id="prevQuotation" class="bodytext" border=0 width="100%" height="100%" cellspacing='0' cellpadding='1' style="border-width: 1px;">
                            <tr height=20>
                                <td class="tdThinBorderLTB" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Quotation No</font></font></td>
                                <%--<td class="tdThinBorderLTB" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Quotation Date</font></font></td>--%>
                                <td class="tdThinBorderLTB" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">SalesOrder No</font></font></td>
                                <td class="tdThinBorderLTB" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF"><bean:message key="label.sales.shipToCustomer"/></font></font></td>
                                <td class="tdThinBorderLTB" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">New <br><bean:message key="label.sales.shipToCustomer"/></font></font></td>
                                <td class="tdThinBorderLTB" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF"> <bean:message key="label.sales.endUser"/></font></font></td>
                                <td class="tdThinBorderLTB" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">New <br><bean:message key="label.sales.endUser"/></font></font></td>
                                <td class="tdThinBorderLTB" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Part Number </font></font></td>
                                <td class="tdThinBorderLTB" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Ship <br>Date</font></font></td>
                                <td class="tdThinBorderLTB" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Billing <br>Qty</font></font></td>
                                <td class="tdThinBorderLRTB" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Backlog <br>Qty</font></font></td>
                                <td class="tdThinBorderLTB" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Schedule  <br>Date</font></font></td>
                             </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=5></td></tR>
</table>
<!-- till here -->
</form>
</BODY>
</HTML>
